#include <stdio.h>

/*
 * log a message
 */
void log_msg(const char * msg,const char * format)
{
	if(msg&&format)
		printf(msg,format);
}

char * randstr(char *dst, int size)
{
	static const char text[] =	"abcdfghjklmnpqrstvwxz1234567890";
	int i, len = rand() % (size - 1);
	for ( i = 0; i < len; ++i )
		dst[i] = text[rand() % (sizeof text - 1)];
	dst[i] = '\0';
	return dst;
}
